\subsection{Introduction and postulates}
When velocities get comparable to the speed of light \(c = \SI{299792458}{\metre\per\second}\), the Newtonian theory of dynamics is no longer a good approximation to real-world dynamical systems.
In this case, we need to consider the Special Theory of Relativity in order to get a better understanding of the real world.
The theory of special relativity is based on two postulates:
\begin{enumerate}
	\item The laws of physics are the same in all inertial frames.
	\item The speed of light in a vacuum is the same in all inertial frames.
\end{enumerate}
The first postulate is consistent with the Newtonian theory of dynamics.
The second postulate arises from the fact that we cannot detect any change in the speed of light in inertial frames moving at different velocities.
This second postulate then has major consequences; in fact, we must rewrite our understanding of space and time, as well as the relationships between energy, momentum and mass.

\subsection{Lorentz transformations}
Consider two inertial frames \(S\) and \(S'\), which are related by a Galilean transformation given by
\[
	x' = x - vt;\quad y' = y;\quad z' = z;\quad t' = t
\]
Consider the path of a ray of light travelling in the \(x\) direction in \(S\).
It has position \(x = ct\).
In \(S'\), we have
\[
	x' = x - vt = ct - vt = (c-v)t'
\]
This contradicts the second postulate, since this would imply that the speed of light is not in fact the same in all inertial frames.
Therefore, the assumption that there exists a Galilean transformation between the inertial frames was incorrect.
In order to rectify this apparent contradiction, we must let space and time interact with each other under this transformation.
The particular transformation that satisfies both postulates of special relativity is called the Lorentz transformation; we will now construct such a transformation.

Consider inertial frames \(S\) and \(S'\) that have the same origin when \(t=t'=0\).
\(S\)' is moving at a speed \(v\) in the \(x\) direction relative to \(S\), and we will assume that \(y' = y\) and \(z' = z\).
Postulate 1 implies that a particle moving at a constant velocity in \(S\) must appear to be moving at a constant velocity in \(S'\).
So the transformation \((x, t) \mapsto (x', t')\) must preserve straight lines, hence it must be a linear transformation.
We know that the origin in \(S'\) (called \(O'\)) moves with speed \(v\), hence
\begin{equation}
	x' = \gamma(x - vt) \tag{1}
\end{equation}
where \(\gamma\) is a function of \(\abs{v}\), since there is no directional preference in our system of physics.
Further, \(O\) moves with speed \(-v\) in \(S'\), so in the same way,
\begin{equation}
	x = \gamma(x' + vt') \tag{2}
\end{equation}
The \(\gamma\) value is the same since \(\gamma(v) = \gamma(-v)\).
Consider a light ray passing through \(O\) and \(O'\) at \(t=t'=0\), moving in the \(x\) direction.
\[
	x = ct;\quad x' = ct'
\]
We can now substitute these equations into the results we found before.
\[
	x = ct = \gamma(x' + vt') = \gamma(c + v)t';\quad x' = ct' = \gamma(x - vt) = \gamma(c - v)t
\]
For consistency,
\[
	\gamma^2 \qty(1 - \frac{v}{c})\qty(1 + \frac{v}{c}) = 1
\]
Hence,
\[
	\gamma = \frac{1}{\sqrt{1 - \frac{v^2}{c^2}}}
\]
We call \(\gamma\) the Lorentz factor.
Using (1) and (2), we can deduce that
\begin{align*}
	vt' & = \frac{x}{\gamma} - x'                         \\
	    & = \frac{x}{\gamma} - \gamma(x - vt)             \\
	    & = \gamma\qty(\frac{1}{\gamma^2}-1)x + \gamma vt \\
	    & = \gamma\qty(vt - \frac{v^2}{c^2}x)             \\
\end{align*}
Hence,
\[
	t' = \gamma\qty(t - \frac{vx}{c^2})
\]
It is easy to deduce the inverse transformation
\[
	t = \gamma\qty(t' + \frac{vx'}{c^2})
\]
Note also that \(y\) and \(z\) are unchanged.
Note that \(\gamma(v) \geq 1\), and \(\gamma \to \infty\) as \(\abs{v} \to c\).
In particular, the Galilean transformation is recovered when \(\gamma \to 1\).
Also, as \(v \to c\), we have approximately
\[
	\gamma \approx \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{1 - \frac{v}{c}}}
\]

\begin{example}
Consider a light ray travelling in the \(x\) direction.
In \(S\), \(x=ct\), \(y=0\), \(z=0\).
In \(S'\),
\[
	x' = \gamma(x-vt) = \gamma(c-v)t;\quad t' = \gamma\qty(t - \frac{vx}{c^2}) = \gamma\qty(1 - \frac{v}{c})t
\]
and additionally \(y=0\), \(z=0\).
Combined, we find
\[
	\frac{x'}{t'} = \frac{\gamma(c - v)}{\gamma\qty(1 - \frac{v}{c})}
\]
Now instead, consider a light ray travelling in the \(y\) direction in \(S\).
In \(S\), \(x=0\), \(y=ct\), \(z=0\).
In \(S'\),
\[
	x' = \gamma(x-vt);\quad t' = \gamma\qty(t - \frac{vx}{c^2})
\]
and \(y' = y = ct\), \(z' = z = 0\).
Since \(x=0\) at all time, we have
\[
	x' = -\gamma vt;\quad t' = \gamma t
\]
The square of the speed of the light ray in \(S'\) is given by the \(x\) component squared plus the \(y\) component squared.
\[
	c'^2 = v^2 + \frac{c^2}{\gamma^2} = c^2
\]
as expected.
Note that while the speed of light has remained fixed, the direction has changed.

\subsection{General properties of Lorentz transformation}
Note that the following always holds.
\begin{align*}
	c^2 t'^2 - r'^2 & = c^2 t'^2 (x'^2 + y'^2 + z'^2)                                                                            \\
	                & = c^2 \gamma^2 \qty(t - \frac{vx}{c^2})^2 - (x - vt)^2 \gamma^2 - y^2 - z^2                                \\
	                & = c^2 \gamma^2 \qty(t^2 - \frac{2vxt}{c^2} + \frac{v^2x^2}{c^2}) - \gamma(x^2 - 2vxt + v^2t^2) - y^2 - z^2 \\
	                & = c^2 t^2 - x^2 - y^2 - z^2                                                                                \\
	                & = c^2 t^2 - r^2
\end{align*}
This quantity is invariant under Lorentz transformations.
So, considering a radial emission of light rays, if \(r' = ct'\), then \(r = ct\).
\end{example}
